<?php

use Illuminate\Database\Seeder;

class EduCategorySeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $categorys = [
            ['name'=>'技术分享'],
            ['name'=>'工作生活'],
            ['name'=>'桌面文化']
        ];
        foreach ($categorys  as $category){
            //调用EduCategory模型的create方法向模型对应的数据库中新增数据
            \App\Models\EduCategory::create($category);
        }
    }
}
